Package | Class | Use | Tree | Deprecated | Index | Help
| Doclet API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javadoc
Interface Tag

All Known Subinterfaces:
  ParamTag, SeeTag, SerialFieldTag, ThrowsTag

public interface Tag

Represents a documentation tag, e.g. @since, @author, @version. Given a tag (e.g. "@since 1.2"), holds tag name (e.g. "@since") and tag text (e.g. "1.2"). Tags with structure or which require special processing are handled by subclasses (ParamTag, SeeTag, and ThrowsTag.

See Also:
  `SeeTag`, `ParamTag`, `ThrowsTag`, `Doc.tags()`

Method Summary
`Tag[]` | `firstSentenceTags()` Return the first sentence of the comment as tags.
`Tag[]` | `inlineTags()` For documentation comment with embedded @link tags, return the array of Tags consisting of SeeTag(s) and text containing Tag(s).
`String` | `kind()` Return the kind of this tag.
`String` | `name()` Return the name of this tag.
`SourcePosition` | `position()` Return the source position of this tag.
`String` | `text()` Return the text of this tag, that is, portion beyond tag name.
`String` | `toString()` convert this object to a string.

Method Detail

### name

    public String name()

  Return the name of this tag.

### kind

    public String kind()

  Return the kind of this tag.

### text

    public String text()

  Return the text of this tag, that is, portion beyond tag name.

### toString

    public String toString()

  convert this object to a string.

  Overrides:
    `toString` in class `Object`

### inlineTags

    public Tag[] inlineTags()

  For documentation comment with embedded @link tags, return the array of Tags consisting of SeeTag(s) and text containing Tag(s). Within a comment string "This is an example of inline tags for a documentaion comment `{@link Doc commentlabel}`", where inside the inner braces, the first "Doc" carries exctly the same syntax as a SeeTag and the second "commentlabel" is label for the Html Link, will return an array of Tag(s) with first element as Tag with comment text "This is an example of inline tags for a documentation comment" and second element as SeeTag with referenced class as "Doc" and the label for the Html Link as "commentlabel".

  Returns:
    Tag[] Array of tags with inline SeeTags.
  See Also:
    `ParamTag`, `ThrowsTag`

### firstSentenceTags

    public Tag[] firstSentenceTags()

  Return the first sentence of the comment as tags. Includes inline tags (i.e. {@link reference} tags) but not regular tags. Each section of plain text is represented as a `Tag` of kind "Text". Inline tags are represented as a `SeeTag` of kind "link". If the locale is English language, the first sentence is determined by the rules described in the Java Language Specification (first version): "This sentence ends at the first period that is followed by a blank, tab, or line terminator or at the first tagline.", in addition a line will be terminated by paragraph and section terminating HTML tags: <p> </p> <h1> <h2> <h3> <h4> <h5> <h6> <hr> <pre> or </pre>. If the locale is not English, the sentence end will be determined by `java.text.BreakIterator.getSentenceInstance(Locale)`.

  Returns:
    an array of `Tag`s representing the first sentence of the comment

### position

    public SourcePosition position()

  Return the source position of this tag.

  Returns:
    the source position of this tag.

Package | Class | Use | Tree | Deprecated | Index | Help
| Doclet API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.